﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace MineLaunch.Windows
{
    /// <summary>
    /// TextWindow.xaml の相互作用ロジック
    /// </summary>
    public partial class TextWindow : Window
    {
        public TextWindow()
        {
            InitializeComponent();
        }

        private void OkButton_Click(object sender, RoutedEventArgs e)
        {
            this.Text = textbox.Text;
            DialogResult = true;
        }

        private void Window_SourceInitialized(object sender, EventArgs e)
        {
            this.textbox.Text = this.Text;
            this.textbox.Focus();
            this.textbox.CaretIndex = this.textbox.Text.Length ;
        }

        public string Text;
    }
}
